package cn.formaggie.service.impl;

import cn.formaggie.dao.HandingDao;
import cn.formaggie.dao.StoreItemDao;
import cn.formaggie.entity.model.store.Handing;
import cn.formaggie.entity.model.store.StoreItem;
import cn.formaggie.service.face.HandingService;
import cn.formaggie.service.face.StoreItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("handingService")
public class HandingServiceImpl implements HandingService {
    @Autowired
    private HandingDao handingDao;

    @Override
    public List<Handing> findHandings(Map<String, Object> map) {
        return handingDao.findHandings(map);
    }

    @Override
    public List<Handing> getAllHandings() {
        return handingDao.getAllHandings();
    }

    @Override
    public Integer getHandingsCount(Map<String, Object> map) {
        return handingDao.getHandingsCount(map);
    }

    @Override
    public Boolean modifyHandingInfo(Handing handing) {
        return handingDao.modifyHandingInfo(handing)>0?true:false;
    }

    @Override
    public Boolean addHanding(Handing handing) {
        return handingDao.addHanding(handing)>0?true:false;
    }
}
